home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / pgp20src.zip / CCC < prev    next >
Text File  |  1992-07-24  |  320b  |  26 lines

  1. #!/bin/sh
  2. #
  3. # script to compile ANSI source with a K&R compiler and unproto.
  4. #
  5.  
  6. while :
  7. do
  8.     case $1 in
  9.         -c)    ;;
  10.         -o)    shift ;;
  11.         *.c)    break ;;
  12.         *)    arg="$arg $1" ;;
  13.     esac
  14.     shift
  15. done
  16.  
  17. set -e
  18.  
  19. f=$1
  20. shift
  21. b=`basename $f .c`
  22.  
  23. cc -E $arg $f | unproto/unproto >${b}.i 
  24. cc -c $arg ${b}.i $*
  25. rm ${b}.i
  26.